<div id="gen_re_password" class="OneContainer">
  <div class="row">
    <div class="col-sm-5">
      <div class="Panel PanelRed">
        <div class="PanelItem">修改密码须知</div>
        <div class="PanelBody">
          <p>1. 密码安全至关重要，安全程度绝大部分取决密码，推荐采用数字，字母(大小写)，符号组合为密码最佳。</p>
          <p>2. 其他任何人都不会知道您的密码，包括管理员，密码采用不可逆向的加密方式，在密码足够复杂的情况下，几乎无法得知密码。</p>
          <p>3. 密码必须 6~18 位，否则会拒绝修改。</p>
        </div>
      </div>
    </div>
    <div class="col-sm-7">
      <div class="Panel PanelBlack">
        <div class="PanelItem">密码修改表单</div>
        <div class="PanelBody">
          <div class="row">
            <div class="col-lg-12">
              <table class="PropertiesList" width="100%">
                <tr>
                  <th>项目标题</th>
                  <th></th>
                </tr>
                <tr>
                  <th>原密码</th>
                  <th>
                    <div class="input-group input-group-sm">
                      <input type="password" class="form-control" aria-describedby="basic-addon1" v-model="oldPassword" />
                    </div>
                  </th>
                </tr>
                <tr>
                  <th>新密码</th>
                  <th>
                    <div class="input-group input-group-sm">
                      <input type="password" class="form-control" aria-describedby="basic-addon1" v-model="newPassword1" />
                    </div>
                  </th>
                </tr>
                <tr>
                  <th>确认新密码</th>
                  <th>
                    <div class="input-group input-group-sm">
                      <input type="password" class="form-control" aria-describedby="basic-addon1" v-model="newPassword2" />
                    </div>
                  </th>
                </tr>
              </table>
              <br />
              <p>确认无误后，您可以进行以下操作:</p>
              <div class="Line"></div>
              <div class="PanelItemMuem">
                <button class="btn btn-info" v-on:click="toRePassword()">修改密码</button>
                <button class="btn btn-success" v-on:click="toBack()">返回到用户中心</button>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<!--js-->
<script>
  MI.rListener("onload", function () {
    // 定义页面地址
    TOOLS.definePage("template/component/gen_repassword", "", "");

    new Vue({
      el: "#gen_re_password",
      data: {
        oldPassword: "",
        newPassword1: "",
        newPassword2: "",
      },
      methods: {
        toBack: function () {
          RES.redirectPage("./template/gen_home.html", "genuser/home", "");
        },
        toRePassword: function () {
          if (this.newPassword1 != this.newPassword2) {
            TOOLS.pushMsgWindow("新密码与新的确认密码不一致");
            return;
          }
          var obj = {
            //username : '保留使用',
            oldPassword: this.oldPassword,
            newPassword: this.newPassword2,
          };
          WS.sendMsg("genuser/re_password", JSON.stringify(obj));
        },
      },
    });
  });

  MI.rListener("onend", function () {});
</script>
